package com.lkbaby.factory;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

public class LocalDateFactory {

	public static LocalDate fromInt(int yyyyMMdd) {
		StringBuilder s = new StringBuilder(String.valueOf(yyyyMMdd));
		if (s.length() != 8) {
			return null;
		}
		return LocalDate.parse(s, DateTimeFormatter.ofPattern("yyyyMMdd"));
	}

}
